//
//  MineHeaderView.m
//  Books
//
//  Created by tao故乡的云 on 2017/3/8.
//  Copyright © 2017年 故乡的云. All rights reserved.
//

#import "MineHeaderView.h"
#import "UIImage+TLImage.h"

@interface MineHeaderView ()
@property (weak, nonatomic) IBOutlet UIImageView *iconImage;
@property (weak, nonatomic) IBOutlet UILabel *userName;
@property (weak, nonatomic) IBOutlet UIButton *tag1;
@property (weak, nonatomic) IBOutlet UIButton *tag2;
@property (weak, nonatomic) IBOutlet UIButton *tag3;
@property (weak, nonatomic) IBOutlet UILabel *geyan;
@end

@implementation MineHeaderView

+ (instancetype)mineHeaderView {
    
    MineHeaderView *headerView = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil][0];
    
    headerView.icon = @"icon";
    return headerView;
}

- (void)setIcon:(NSString *)icon {
    _icon = icon;
    
    UIImage *image = nil;
    if (icon == nil) {
        image = [UIImage imageNamed:@"icon"];
    }else {
        image = [UIImage imageNamed:icon];;
    }
    
    self.iconImage.image = [image circleImageWithBorderWidth:20 borderColor:[UIColor greenColor]];
}

@end
